#include <iostream>
#include "program.h"

Symbol::Symbol(type t, string s){
        kind = t;
        name = s;
}


Symbol::Symbol(){
    this->tmp = 33333;
}

Symbol::~Symbol(){
    cout<<"release Symbol"<<endl;
}
Symbol::Symbol(const Symbol & s){
        this->kind = s.kind;
        this->name = s.name;
        this->value = s.value;
        this->tmp = s.tmp;
}

void Symbol::backfillValue(void * v){
    value = v;
    }


void Symbol::backfilltmp(int v){
    this->tmp = v;
    }

int Symbol::gettmp(){
    return this->tmp;
    }
void Symbol::backfillTag(string tag){
    this->name = tag;
    }

void Symbol::backfillType(){
    }
void *Symbol::getvalue(){
        return value;
    }


Exp_VarDefine::Exp_VarDefine(string type){
    cout<<"Exp_VarDefine type "<<type<<endl;
}

Exp_VarDefine::Exp_VarDefine(string type, list<Symbol>* var_list){
    cout<<"type "<<type<<endl;
}

Condition::Condition(string l, string r, string op){
    this->left = l;
    this->right = r;
    if(op==">"){
        this->op = GREATE;   
    }
}
string Condition::temp(){
    return this->left;
}